package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Audit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AuditMapper extends BaseMapper<Audit> {
    /*@Select("select audit_id as id," +
            "article_id as aid," +
            "submitter_id as suid," +
            "auditor_id as auid," +
            "audit_result as res," +
            "audit_time as time " +
            "from audit " +
            "where article_id=#{arid}")
    public List<Comment> selectByArid(int arid);
    @Select("select audit_id as id," +
            "article_id as aid," +
            "submitter_id as suid," +
            "auditor_id as auid," +
            "audit_result as res," +
            "audit_time as time " +
            "from audit " +
            "where submitter_id=#{suid}")
    public List<Comment> selectBySuid(int suid);
    @Select("select audit_id as id," +
            "article_id as aid," +
            "submitter_id as suid," +
            "auditor_id as auid," +
            "audit_result as res," +
            "audit_time as time " +
            "from audit " +
            "where auditor_id=#{auid}")
    public List<Comment> selectByAuid(int auid);
    @Select("select audit_id as id," +
            "article_id as aid," +
            "submitter_id as suid," +
            "auditor_id as auid," +
            "audit_result as res," +
            "audit_time as time " +
            "from audit " +
            "where audit_result=#{res}")
    public List<Comment> selectByRes(boolean res);*/
}